package com.abk.ets.data;

// Generated 26 avr. 2013 10:28:47 by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * Administrateur generated by hbm2java
 */
@Entity
@Table(name = "administrateur", catalog = "etsdatabase")
public class Administrateur implements java.io.Serializable {

	private int idAdministrateur;
	private Personne personne;

	public Administrateur() {
	}

	public Administrateur(Personne personne) {
		this.personne = personne;
	}

	@GenericGenerator(name = "admID", strategy = "foreign", parameters = @Parameter(name = "property", value = "personne"))
	@Id
	@GeneratedValue(generator = "admID")
	@Column(name = "idAdministrateur", unique = true, nullable = false)
	public int getIdAdministrateur() {
		return this.idAdministrateur;
	}

	public void setIdAdministrateur(int idAdministrateur) {
		this.idAdministrateur = idAdministrateur;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Personne getPersonne() {
		return this.personne;
	}

	public void setPersonne(Personne personne) {
		this.personne = personne;
	}

}
